@charset "utf-8";

/* 字体 */
@for $i from 10 through 30 {
  @if ($i%2==0) {
    .f#{$i} {
      font-size: 1px * $i;
    }
  }
}

/* 间距 */
// margin
@for $t from 5 through 30 {
  @if ($t%5==0) {
    .m-top#{$t} {
      margin-top: 1px * $t;
    }
  }
}

@for $r from 5 through 30 {
  @if ($r%5==0) {
    .m-right#{$r} {
      margin-right: 1px * $r;
    }
  }
}

@for $b from 5 through 30 {
  @if ($b%5==0) {
    .m-bottom#{$b} {
      margin-bottom: 1px * $b;
    }
  }
}

@for $l from 5 through 30 {
  @if ($l%5==0) {
    .m-left#{$l} {
      margin-left: 1px * $l;
    }
  }
}

// padding
@for $t from 5 through 30 {
  @if ($t%5==0) {
    .p-top#{$t} {
      padding-top: 1px * $t;
    }
  }
}

@for $r from 5 through 30 {
  @if ($r%5==0) {
    .p-right#{$r} {
      padding-right: 1px * $r;
    }
  }
}

@for $b from 5 through 30 {
  @if ($b%5==0) {
    .p-bottom#{$b} {
      padding-bottom: 1px * $b;
    }
  }
}

@for $l from 5 through 30 {
  @if ($l%5==0) {
    .p-left#{$l} {
      padding-left: 1px * $l;
    }
  }
}

/* 多行超出省略号 */
@mixin ellipsisM($lineNum: 2) {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: $lineNum;
  -webkit-box-orient: vertical;
}

.line-2 {
  @include ellipsisM;
}
